<?php

function checkauthority(){
	if (!current_user_can('edit_themes'))
	wp_die('Sorry, but you don&#8217;t have the administrative privileges needed to do this.');
}
function show_posts_nav() {
	global $wp_query;
	return ($wp_query->max_num_pages > 1);
}
function first_post(){
// Make it look nice
// Create post object
	  $first_post = array();
	  $first_post['post_title'] = 'Welcome to '.THEMENAME.'!';
	
	   $first_post['post_content'] = "<h4 class=''>Your New Pro Theme</h4> <p><img class='alignright' src='".ROOT."/screenshot.png' />Thank you for purchasing this theme.  We hope that you will enjoy it and use it to be successful at whatever you are working on.</p> <p>We understand that it can be difficult to get a new website running so if you have a problem please don't hesitate to <a href='http://www.pagelines.com' target='_blank'>contact us</a> at PageLines.</p>
	   
	   <p><strong>Next Steps:</strong><br/>
	   <ul>
	   	<li>Make sure you've uploaded and activated all the plugins that come with the theme.</li>
		<li>To set up a feature page, create a new page and select the 'Feature Page' template. Then configure it in the feature setup panel in the admin.</li>
	   	<li>Change all theme settings in the options panels within the admin > apprearance area. Here you can show things like authors on posts, only excerpts on the homepage, etc...</li>
	   	<li>Be careful not to break the theme markup (html), markup problems can cause whacky things to happen (like the sidebar falling to the bottom of the page)</li>
	   	<li>Have fun with the design.  We hope you create something that is totally unique and will stand out in the crowd.  Good luck!</li></ul><br/><p>Delete this post in <a href='".admin_url()."edit.php' >the admin</a>.";
	  	$first_post['post_excerpt'] = 'Thanks for purchasing this theme. You now own a great professional theme for Wordpress. Here are some notes...';
	  	$first_post['post_status'] = 'publish';
		$first_post['post_author'] = 1;
		$first_post['post_type'] = 'post';

	// Insert the post into the database
	  $firstpostid = wp_insert_post( $first_post );
	update_post_meta($firstpostid, 'thumb', IMAGE_FOLDER."/screenshotthumb.png");
	
}

?>